﻿using Qi.Data.EntityFramework;
using Qi.Data.Contracts;

namespace Standards.Data.EntityFramework
{
    using Standards.Contracts;
    using Standards.Model.Models;

    public class StandardsUnitOfWork : EntityFrameworkUnitOfWork<StandardsContext>, IStandardsUnitOfWork
    {
        public StandardsUnitOfWork()
        {
            // TODO: population via reflection and container
            this.Roles = new EntityFrameworkRepository<RoleDto>(this.DbContext);
            this.Users = new EntityFrameworkRepository<UserDto>(this.DbContext);
        }

        public IRepository<RoleDto> Roles { get; private set; }
        
        public IRepository<UserDto> Users { get; private set; }
    }
}